package com.mc.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mc.system.mapper.SysAppMenuMapper;
import com.mc.system.domain.SysAppMenu;
import com.mc.system.service.ISysAppMenuService;

/**
 * 移动端菜单 Service业务层处理
 *
 * @author mc
 * @date 2021-03-08
 */
@Service
public class SysAppMenuServiceImpl implements ISysAppMenuService
{
    @Autowired
    private SysAppMenuMapper sysAppMenuMapper;

    /**
     * 查询移动端菜单
     *
     * @param roleId 移动端菜单 ID
     * @return 移动端菜单
     */
    @Override
    public SysAppMenu selectSysAppMenuById(Long roleId)
    {
        return sysAppMenuMapper.selectSysAppMenuById(roleId);
    }

    /**
     * 查询移动端菜单 列表
     *
     * @param sysAppMenu 移动端菜单
     * @return 移动端菜单
     */
    @Override
    public List<SysAppMenu> selectSysAppMenuList(SysAppMenu sysAppMenu)
    {
        return sysAppMenuMapper.selectSysAppMenuList(sysAppMenu);
    }

    /**
     * 新增移动端菜单
     *
     * @param sysAppMenu 移动端菜单
     * @return 结果
     */
    @Override
    public int insertSysAppMenu(SysAppMenu sysAppMenu)
    {
        return sysAppMenuMapper.insertSysAppMenu(sysAppMenu);
    }

    /**
     * 修改移动端菜单
     *
     * @param sysAppMenu 移动端菜单
     * @return 结果
     */
    @Override
    public int updateSysAppMenu(SysAppMenu sysAppMenu)
    {
        return sysAppMenuMapper.updateSysAppMenu(sysAppMenu);
    }

    /**
     * 批量删除移动端菜单
     *
     * @param roleIds 需要删除的移动端菜单 ID
     * @return 结果
     */
    @Override
    public int deleteSysAppMenuByIds(Long[] roleIds)
    {
        return sysAppMenuMapper.deleteSysAppMenuByIds(roleIds);
    }

    /**
     * 删除移动端菜单 信息
     *
     * @param roleId 移动端菜单 ID
     * @return 结果
     */
    @Override
    public int deleteSysAppMenuById(Long roleId)
    {
        return sysAppMenuMapper.deleteSysAppMenuById(roleId);
    }
}
